﻿using System;
using System.Globalization;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Sanctuary
{
    public class ImageConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter,
          CultureInfo culture)
        {
            string sex = value.ToString();
            switch (sex)
            {
                case "M":
                    return new BitmapImage(new Uri(@"Images/male.png", UriKind.Relative));
                case "F":
                    return new BitmapImage(new Uri(@"Images/female.png", UriKind.Relative));
                default:
                    break;
            }
            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter,
          CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
